package com.alisls.shequtao.service.goods.config;

import com.alisls.shequtao.common.core.util.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 商品服务配置类
 *
 * @author Ke Wang
 */
@Configuration
public class ServiceProductConfig {

    @Bean
    public IdWorker idWorker() {
        return new IdWorker();
    }

    /**
     * MyBatis Plus 分页查询拦截器
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }

}
